package com.springboot.example.monitor.dao.impl;

import com.springboot.example.monitor.dao.LogsDao;
import com.springboot.example.monitor.mapper.LogsMapper;
import com.springboot.example.monitor.domain.db.Logs;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* Logs
*
* User: guoyao
* DateTime: 2016-02-23 16:23:51
*
*/
@Service("logsDao")
public class LogsDaoImpl implements LogsDao {

    @Resource
    private LogsMapper logsMapper;

    /**
    *
    * 根据主键查询Logs对象
    *
    * @param logId
    * @return Logs对象
    */
    @Override
    public Logs selectByPrimaryKey(Long logId) {
        return logsMapper.selectByPrimaryKey(logId);
    }

    /**
    *
    * 根据查询条件查询符合条件的Logs对象
    *
    * @param logs
    * @return 符合条件的Logs对象List
    */
    @Override
    public List<Logs> select(Logs logs) {
        return logsMapper.select(logs);
    }

    /**
    *
    * 根据主键删除Logs对象
    *
    * @param logId
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(Long logId) {
        return logsMapper.deleteByPrimaryKey(logId);
    }

    /**
    *
    * 根据条件删除符合条件的Logs对象
    *
    * @param logs
    * @return 影响条件数
    */
    @Override
    public int delete(Logs logs) {
        return logsMapper.delete(logs);
    }

    /**
    *
    * 插入Logs对象
    *
    * @param logs
    * @return 影响条件数
    */
    @Override
    public int insert(Logs logs) {
        return logsMapper.insert(logs);
    }

    /**
    *
    * 更新Logs对象
    *
    * @param logs
    * @return 影响条件数
    */
    @Override
    public int update(Logs logs) {
        return logsMapper.update(logs);
    }
}
